package validation

import (
	"context"
	"mall_frontend_api/biz/lib/biz_error"
	"mall_frontend_api/biz/model/user_report"
)

func CheckCreateUserReport(ctx context.Context, req *user_report.CreateUserReportRequest) error {
	if req.Email == "" {
		return biz_error.NewBizError().SetLogMessage("email").SetBadRequestErrorMessage("Email cannot be empty")
	}

	if req.Report == "" {
		return biz_error.NewBizError().SetLogMessage("report").SetBadRequestErrorMessage("User feedback cannot be empty, please fill in")
	}

	if req.Name == "" {
		return biz_error.NewBizError().SetLogMessage("name").SetBadRequestErrorMessage("User Name cannot be empty, please fill in")
	}

	return nil
}
